package StudyCode.summary.myfile;

import java.nio.file.Path;
import java.nio.file.Paths;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class CombinePath {
	public static void main(String[] args) {
		Path base_1 = Paths.get("C:/folder1/folder2/folder4");
		Path base_2 = Paths.get("C:/folder1/folder2/folder3/test.txt");

		Path path_1 = base_1.resolve("test.txt");
		System.out.println(path_1.toString());

		Path path_2 = base_1.resolve("test2.txt");
		System.out.println(path_2.toString());

		Path path_3 = base_2.resolveSibling("test2.txt");
		System.out.println(path_3.toString());
	}

}
